package com.example.dynamic_sport_android;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class SelectStatusActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_select_status);
        Button individualBtn = findViewById(R.id.btn_individual);
        Button coachBth = findViewById(R.id.btn_coach);
        Button clubBtn = findViewById(R.id.btn_club);
        setListener(individualBtn,IndividualRegisiterActivity.class);
        setListener(coachBth,CoachRegisiterAcitivity.class);
        setListener(clubBtn,ClubRegisiterActivity.class);
    }

    //点击时跳转按钮对应页面
    void setListener(Button btn,Class t) {
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(SelectStatusActivity.this,t);
                startActivity(intent);
            }
        });

    }
}